package china.lzy.api;

import china.lzy.entity.ResResult;
import china.lzy.entity.dto.PageDto;
import china.lzy.entity.pojo.Order;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ Author     ：lzy
 * @ Date       ：Created in 19:53 2021/8/16
 * @ Description：
 */

@Api(tags = "订单管理", value = "订单管理模块")
public interface OrderControllerApi {
    /**
     * 新增
     *
     * @author lzy
     * @date 2021/08/16
     **/
    @ApiOperation("插入订单")
    public ResResult insert(@RequestBody Order order);

    /**
     * 刪除
     *
     * @author lzy
     * @date 2021/08/16
     **/
    @ApiOperation("删除订单")
    public ResResult delete(@PathVariable int id);

    /**
     * 更新
     *
     * @author lzy
     * @date 2021/08/16
     **/
    @ApiOperation("更新订单")
    public ResResult update(@RequestBody Order order);


    /**
     * 查询 根据主键 id 查询
     *
     * @author lzy
     * @date 2021/08/16
     **/
    @ApiOperation("查询单个订单")
    public ResResult load(@PathVariable int id);

    /**
     * 查询 分页查询
     *
     * @author lzy
     * @date 2021/08/16
     **/
    @ApiOperation("分页查询")
    public ResResult pageList(@RequestBody PageDto pageDto);

}
